<div class="modal-header">
  <a class="close" ng-click="$dismiss()">
    <span class="fa fa-times"></span>
  </a>
  <div class="h4 modal-title">
    {$::ctrl.formTitle$}
  </div>
</div>

<div class="modal-body">
  <form name="schemaForm"
        sf-schema="ctrl.schema"
        sf-form="ctrl.form"
        sf-model="ctrl.model"
        sf-options="{ validateOnRender: true,
                      pristine: { errors: false, success: false } }"
        ng-submit="ctrl.submit($event, schemaForm)">
  </form>
  <help-panel class="wizard-help" ng-if="ctrl.helpUrl">
    <ng-include src="ctrl.helpUrl"></ng-include>
  </help-panel>
</div>

<div class="modal-footer">
  <button type="button" class="btn btn-default pull-left" ng-click="$dismiss()">
    <span class="fa fa-close"></span>
    <translate>Cancel</translate>
  </button>

  <button type="button"
          class="btn btn-default"
          ng-click="ctrl.model.tabs.selected = ctrl.model.tabs.selected - 1"
          ng-disabled="ctrl.model.tabs.selected === 0"
          ng-if="ctrl.model.tabs.length > 1">
    <span class="fa fa-angle-left"></span>
    <translate>Back</translate>
  </button>

  <button type="button"
          class="btn btn-default"
          ng-click="ctrl.model.tabs.selected = ctrl.model.tabs.selected + 1"
          ng-if="ctrl.model.tabs.length > 1"
          ng-disabled="ctrl.model.tabs.selected === ctrl.model.tabs.length-1">
    <translate>Next</translate>
    <span class="fa fa-angle-right"></span>
  </button>

  <button type="button"
          class="btn btn-primary"
          ng-disabled="schemaForm.$invalid"
          ng-click="ctrl.submit($event, schemaForm)">
    <span class="fa fa-{$::ctrl.submitIcon$}"></span>
    {$::ctrl.submitText$}
  </button>
</div>
